<?php
class connection{
	
	function sql($query){
		
		   $db= "(DESCRIPTION=(ADDRESS=(PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SID = XE)))";
		   $con = OCILogon ("mlb" , "1234" ,$db) or die( "No se pudo Conectar a la base de Datos!") or die (ocierror());
		   if (! $con ) { 
				   echo "Couldn't make a connection!" ;
				   exit; 
		   } 
		   else{
    			   $sentencia=OCIParse($con,$query);
				   OCIExecute($sentencia, OCI_DEFAULT);
				   OCICommit($con);
				   OCILogoff($con);
				   return $sentencia;
		   }
	}
}
?>